package com.ruoyi.used.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.used.mapper.UsedGoodsDetailsMapper;
import com.ruoyi.used.domain.UsedGoodsDetails;
import com.ruoyi.used.service.IUsedGoodsDetailsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 商品详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-11
 */
@Service
public class UsedGoodsDetailsServiceImpl implements IUsedGoodsDetailsService 
{
    @Autowired
    private UsedGoodsDetailsMapper usedGoodsDetailsMapper;

    /**
     * 查询商品详情
     * 
     * @param deId 商品详情ID
     * @return 商品详情
     */
    @Override
    public UsedGoodsDetails selectUsedGoodsDetailsById(Long deId)
    {
        return usedGoodsDetailsMapper.selectUsedGoodsDetailsById(deId);
    }

    /**
     * 查询商品详情列表
     * 
     * @param usedGoodsDetails 商品详情
     * @return 商品详情
     */
    @Override
    public List<UsedGoodsDetails> selectUsedGoodsDetailsList(UsedGoodsDetails usedGoodsDetails)
    {
        return usedGoodsDetailsMapper.selectUsedGoodsDetailsList(usedGoodsDetails);
    }

    /**
     * 新增商品详情
     * 
     * @param usedGoodsDetails 商品详情
     * @return 结果
     */
    @Override
    public int insertUsedGoodsDetails(UsedGoodsDetails usedGoodsDetails)
    {
        return usedGoodsDetailsMapper.insertUsedGoodsDetails(usedGoodsDetails);
    }

    /**
     * 修改商品详情
     * 
     * @param usedGoodsDetails 商品详情
     * @return 结果
     */
    @Override
    public int updateUsedGoodsDetails(UsedGoodsDetails usedGoodsDetails)
    {
        return usedGoodsDetailsMapper.updateUsedGoodsDetails(usedGoodsDetails);
    }

    /**
     * 删除商品详情对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteUsedGoodsDetailsByIds(String ids)
    {
        return usedGoodsDetailsMapper.deleteUsedGoodsDetailsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除商品详情信息
     * 
     * @param deId 商品详情ID
     * @return 结果
     */
    @Override
    public int deleteUsedGoodsDetailsById(Long deId)
    {
        return usedGoodsDetailsMapper.deleteUsedGoodsDetailsById(deId);
    }
}
